<template>
	<view>
		<view class="">
			<view class="topuser">
				<view class="">
					<img class="avatar" :src="list.avatarUrl" alt="" />
				</view>
				<view class="names">
					{{list.name}}<text style="margin-left: 50rpx;">{{sex == 1 ? '男' : '女'}}</text>
				</view>
			</view>
			<view class="titles">基本信息</view>
			<view class="" style="display: flex;justify-content: space-between;padding: 20rpx;">
				<view class="" style="max-width: 50%;">
					<view class="its">
						出生年份：{{list.birthday}}
					</view>
					<view class="its">
						手机号码：{{list.tel}}
					</view>
					<view class="its">
						最高学历：{{list.education}}
					</view>
					<view class="its">
						工作经验：{{list.express}}
					</view>
					<view class="its">
						想找的行业：{{list.jobcate_title}}
					</view>
				</view>
				<view class="" style="max-width: 50%;">
					<view class="its">
						想找的职位：{{list.jobtitle}}
					</view>
					<view class="its">
						工作性质：{{list.worktype_title}}
					</view>
					<view class="its">
						期望薪资：{{list.money}}
					</view>
					<view class="its">
						现居住地：{{list.address}}
					</view>
					<view class="its">
						目前状态：{{list.current_title}}
					</view>

				</view>
				
			</view>
			<view class="titles">自我介绍</view>
			<view style="margin:20rpx">
				<rich-text :nodes="list.content"></rich-text>
				
			</view>
			<view class="titles">教育经历</view>
			<view class="" style="display: flex;justify-content: space-between;padding: 20rpx;" v-for="(item,index) in list.edu" :key="index">
				<view class="" style="max-width: 50%;">
					<view class="its">
						入学时间：{{item.begindateschool}}
					</view>
					<view class="its">
						学校：{{item.school}}
					</view>
					<view class="its">
						专业：{{item.vocation}}
					</view>
				</view>
				<view class="" style="max-width: 50%;">
					<view class="its">
						毕业时间：{{item.enddateschool}}
					</view>
					<view class="its">
						学历：{{item.educationname}}
					</view>
				</view>
			</view>
			<view class="titles">工作经历</view>
			<view class="" style="display: flex;justify-content: space-between;padding: 20rpx;" v-for="(item,index) in list.express_list" :key="index">
				<view class="" style="max-width: 50%;">
					<view class="its">
						公司：{{item.companyname}}
					</view>
					<view class="its">
						入职时间：{{item.begindatejob}}
					</view>
					
					<view class="its">
						职位描述：{{item.jobbrief}}
					</view>
				</view>
				<view class="" style="max-width: 50%;">
					<view class="its">
						职位：{{item.jobtitle}}
					</view>
					<view class="its">
						离职时间：{{item.enddatejob}}
					</view>
					
				</view>
			</view>
		</view>
		<view class="" style="height: 180px;">
			
		</view>
		<view class="" style="display: flex;justify-content: space-around;position: fixed;left: 0px;right:0px;bottom: 20px">
			<view class="btns" @click="update">修改</view>
			<view class="btns" @click="config">确认</view>
		</view>
	</view>
</template>

<script>
	import {
		User
	} from '../../model/user-model.js';
	import {
		Token
	} from '../../utils/token.js';
	var token = new Token();
	var user = new User();
	export default {
		data() {
			return {
				list:{}
			}
		},
		onLoad() {
			this.getdata()
		},
		methods: {
			getdata(){
				var that = this
				var params = {}
				user.getnotedetail((data) => {
					if(data.code == 0){
						that.list = data.data
					}else{
						uni.showToast({
							title:data.msg
						})
					}
				}, params);
			},
			update(){
				uni.navigateTo({
					url:'/pages/mynote/index'
				})
			},
			config(){
				uni.setStorageSync('config',1)
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	page {
		background-color: #f7f7f7;
	}

	.avatar {
		width: 150rpx;
		height: 150rpx;
		border-radius: 50%;

	}

	.topuser {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin: 0px auto;
		padding-top: 50rpx;
		padding-bottom: 20rpx;
		border-bottom: 1px solid #fff;
		margin-bottom: 10rpx;
	}

	.names {
		font-size: 34rpx
	}
	.titles{
		font-size: 32rpx;font-weight: bold;margin-bottom: 10rpx;margin-left: 20rpx;
	}
	.its{
		margin-bottom: 15rpx;
		/* font-weight: ; */
	}
	.btns{
		width: 45%;
		background-color: #3f9300;
		color:#fff;
		text-align: center;
		padding: 20rpx 0rpx;
		border-radius: 20rpx;
		
		
	}
</style>